package com.example.comsys.model;

import java.time.LocalDate;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * Employee attend model
 *
 * @author wjh
 * @date 2019/12/29, 周日
 */
@Getter
@Setter
@ToString(callSuper = true)
public class Attend extends EmployeeBase {

  private Department department;

  /**
   * minute of late, zero if not
   */
  private int late;

  /**
   * minute of leave early, zero if not
   */
  private int leaveEarly;

  /**
   * weather taking leave due to illness
   */
  private boolean illAbsence;

  /**
   * weather taking leave due to something
   */
  private boolean thingAbsence;

  /**
   * weather on public holiday
   */
  private boolean pubHoliday;

  /**
   * 考勤日期
   */
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  private LocalDate date;

}
